package leetcode.code015;

import java.util.List;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution015 implements IDebug {

	abstract public List<List<Integer>> threeSum(int[] nums);

	@Override
	public void debug1() {
		String numsStr = "[-1,0,1,2,-1,-4]";
		String output = "[[-1,-1,2],[-1,0,1]]";
		this.debug(numsStr, output);
	}

	private void debug(String numsStr, String output) {
		int[] nums = HelpDebug.str2array3(numsStr);
		List<List<Integer>> result = this.threeSum(nums);
		HelpDebug.printObject(output);
		HelpDebug.printObject(result);
	}

	@Override
	public void debug2() {
		String numsStr = "[0,0,0]";
		String output = "[0,0,0]";
		this.debug(numsStr, output);
	}

	@Override
	public void debug3() {
		String numsStr = "[-1,0,1]";
		String output = "[-1,0,1]";
		this.debug(numsStr, output);
	}

	@Override
	public void debug4() {
		String numsStr = "[-1,0,1,2,-1,-4]";
		String output = "[[-1,-1,2],[-1,0,1]]";
		this.debug(numsStr, output);

	}

}
